package mobi.hami.huapin.service.impl;

import mobi.hami.huapin.dao.ProductskuMapper;
import mobi.hami.huapin.model.Productsku;
import mobi.hami.huapin.service.ProductSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductSkuServiceImpl implements ProductSkuService {
    @Autowired
    ProductskuMapper productskuMapper;

    public List<Productsku> getProductSkuList(Productsku productsku) {
        return productskuMapper.getProductSkuList(productsku);
    }

    public int getProductSkuAdd(Productsku productsku) {
        return productskuMapper.insert(productsku);

    }
    /*
     * 物理删除sku
     * */
    public  int   deleteSku(Productsku productsku){
        return  productskuMapper.deleteSku(productsku);
    }
    @Override
    public  int skuUpdate(Productsku productsku){
        return  productskuMapper.updateByPrimaryKey(productsku);
    }
}
